package com.study.a01mystream;

import java.util.HashMap;

public class StreamDemo3 {
    public static void main(String[] args) {

        //双链集合
        HashMap<String, Integer> map = new HashMap<>();

        map.put("张三",18);
        map.put("李四",19);
        map.put("王五",20);
        map.put("王六",21);
        map.put("王七",22);
        map.put("张无极",23);

        //获取stream流
        map.keySet().stream().forEach(s-> System.out.println(s));

        //第二种获取Stream流
        map.entrySet().stream().forEach(s-> System.out.println(s));
    }
}
